package com.stormchaser.testproject.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stormchaser.testproject.model.Fleat;
import com.stormchaser.testproject.repository.FleatRepository;

@Service
public class FleatsService {
	
	private static final Logger logger = LoggerFactory.getLogger(FleatsService.class);
	
	@Autowired
	private FleatRepository fleatRepository;
	
	public Iterable<Fleat> findAll(){
		return fleatRepository.findAll();
	}
	
	public Fleat save (Fleat f){
		return fleatRepository.save(f);
	}
	
	public void delete(Long id){
		fleatRepository.delete(id);
	}
	
	public Fleat findOne(Long id){
		return fleatRepository.findOne(id);
	}
	
}